An E cient Implementation of Plaid

نویسنده

  • Sarah Chasins
چکیده

State is central to understanding objects in the real world a moving car is very di erent from a parked car. Yet most object-oriented languages provide no native support for state or state change. The Plaid language introduces a new object model in which objects are not only instances of a class, but can also be in mutable states. In Plaid, a car object can have one abstract state for driving and another for not driving. Transitioning the object from the driving to the not driving state with Plaid's state change operator removes members that are available only in the driving state for instance, speed and adds members associated with the not driving state. Traditionally, efcient implementations of object-oriented languages have required that objects have stable members in order to facilitate fast member access. State change alters members at runtime, presenting a new challenge for e cient compilation. To address this challenge, we developed a novel representation for state at runtime that enables state change without sacri cing fast member access. We implemented our representation in a new code generator and runtime system for compiling Plaid to JavaScript. Our implementation improves program execution time by a factor of 48 over a Plaid implementation with an alternative state representation that slows member access.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

An E cient Implementation of Naming and Addressing of Objects

This paper proposes an e cient implementation of method calls using the Hierarchy-Relative Naming Scheme. The relative cost of the straightforward implementation of the scheme increases dramatically when virtual address space sharing optimization and replacement with local procedure calls is taken into account. We designed a method call instruction sequence that is as e cient as a simple proced...

متن کامل

Resource-Based Programming in Plaid

Many modern programming challenges center on the correct handling of abstract resources whose use is constrained in some way. These constraints include initialization before use, resource cleanup, safe coordination among threads, and usage protocols. Unlike class-based languages, the resource-based programming language Plaid models interfaces, representation, and behavior using states, and an o...

متن کامل

The nature of V1 neural responses to 2D moving patterns depends on receptive-field structure in the marmoset monkey.

A plaid pattern is formed when two sinusoidal gratings of different orientations are added together. Previous work has shown that V1 neurons selectively encode the direction and orientation of the component gratings in a moving plaid but not the direction of the plaid itself (Movshon et al. 1985). We recorded the responses of 49 direction-selective neurons to moving gratings and plaid patterns ...

متن کامل

Contrast Gain Control in Plaid Pattern Detection

A plaid is a combination of two gratings whose orientations are orthogonal to each other with the same or similar contrasts. We used plaid patterns as stimuli to investigate the mechanisms underlying the detection of a plaid to understand how the visual system combines information from orientation-selective channels. We used a masking paradigm in which an observer was required to detect a targe...

متن کامل

Realization of Block Adaptive Filters using Fermat Number Transforms

This paper is about an e¢cient implementation of adaptive ...ltering for echo cancelers. First, a realization of an improved Proportionate Normalized Least Mean Squares (PNLMS+ +) adaptive ...lter using block structure is presented. Then, an e¢cient implementation of the block ...ltering process is proposed using Number Theoretic Transforms (NTT) which can signi...cantly reduce the computation ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2012